x = float(input())
if x <= 15:
    print('{:.2f}'.format(4 * x / 3))
else:
    print('{:.2f}'.format(2.5*x-17.5))